﻿Imports System.Data.SqlClient
Public Class user
    Dim cmd As New SqlCommand
    Private Sub user_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        condb()
    End Sub

    Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
        cmd = New SqlCommand
        cmd.Connection = cn
        cmd.CommandText = "INSERT INTO tblUser VALUES (N'" & txtusername.Text & "',N'" & txtPassword.Text & "',N'" & txtusertype.Text & "')"
        cmd.ExecuteNonQuery()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        txtid.Clear()
        txtPassword.Clear()
        txtusername.Clear()
        txtusertype.Clear()
    End Sub
End Class